@extends('default.mobile.layouts.companyPublic')
@section('title','编辑部门-'.Site::get('webname'))
{{--首页css--}}
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/mobile/company/common.css')}}">
@endsection
{{--头部标签--}}
@section('tag','编辑部门')
@section('link') href="{{url('mobile/company/department')}}" @endsection


{{--主体内容--}}
@section('content')
    <div class="fill">
        <div class="form_info">
            <form action="{{url('mobile/company/department/'.$CompanyDepartment->id)}}" onsubmit="return checkDepartment('#departmentFrom')"
                  method="post" name="departmentFrom" id="departmentFrom">
                <input type="hidden" name="_method" value="put">
                <input type="hidden" name="id" value="{{$CompanyDepartment->id}}">
                {{csrf_field()}}
                <dl>
                    <dt>部门名称<span class="asterisk">*</span></dt>
                    <dd><input type="text" name="name" id="name" value="{{$CompanyDepartment->name}}" placeholder="请输入部门名称"></dd>
                </dl>
                <dl>
                    <dt>联系人<span class="asterisk">*</span></dt>
                    <dd><input type="text" name="contacts" id="contacts"  value="{{$CompanyDepartment->contacts}}" placeholder="请输入联系人"></dd>
                </dl>
                <dl>
                    <dt>手机号码<span class="asterisk">*</span></dt>
                    <dd><input type="text" name="mobile" id="mobile"  value="{{$CompanyDepartment->mobile}}" placeholder="请输入手机号码"></dd>
                </dl>
                <dl>
                    <dt>电话号码<span class="asterisk">*</span></dt>
                    <dd><input type="text" name="phone" id="phone"  value="{{$CompanyDepartment->phone}}" placeholder="格式：0576-82441111"></dd>
                </dl>
                <dl>
                    <dt>传真号码</dt>
                    <dd><input type="text" name="fax" id="fax"  value="{{$CompanyDepartment->fax}}" placeholder="格式：0576-82441111"></dd>
                </dl>
                <dl>
                    <dt>电子邮箱</dt>
                    <dd><input type="text" name="email" id="email"  value="{{$CompanyDepartment->email}}" placeholder="请输入电子邮箱"></dd>
                </dl>
                <div class="form_sub"><input type="submit" value="保存"></div>
            </form>
        </div>
    </div>
    <!-- E分页 -->
@endsection

@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/default/js/mobile/company/department_manage.js')}}"></script>
    <script>
        //错误信息提示
                @if(count($errors)>0)
                @if(is_object($errors))
        var msgErr='';
        @foreach($errors->all() as $error)
                msgErr += "<p style='line-height: .4rem; width: 100%'>{{$error}};</p>";
        @endforeach
        layerMsg(msgErr,2);
        @endif
        @endif
    </script>
@endsection